// 默认图片
// @ts-ignore
import DefaultImage from '@/assets/ImageLazy/error.png';

// 是否是Debug模式
const debug = process.env.NODE_ENV === 'development';

// 全局的配置
class WConfig {

  // 平台 pc mobile
  public static platform: string = '';
  // vuex
  public static store: any = null;
  // router
  public static router: any = null;
  // 默认图片
  public static defaultImage: any = DefaultImage;
  // PC端的HTML
  public static pcHtml: string = debug ? '/pc.html' : '';
  // 网站统计
  public static webStatistical: string = 'http://tongji.baidu.com/web/welcome/ico?s=203d949ee1c33ca227d30e382818a217';
  // 微信二维码图片
  public static weiXinCode: string = 'https://cdn.wangyabin.top/images/OSS_1537176369145_2660519985115064.JPG';
  // CDN图片前缀
  public static imageCDNPerfix: string = 'https://cdn.wangyabin.top/';
  // CDN图片前缀（相册）
  public static photoCDNPerfix: string = 'https://photo.wangyabin.top/';
  // 备案工信部网址站URL
  public static gongXinUrl: string = 'http://www.miitbeian.gov.cn';
  // 公司URL
  public static companyUrl: string = 'https://www.aiyuangong.com/';
  // 个人头像
  public static meIcon: string = 'https://cdn.wangyabin.top/images/OSS_1539339118932_6980495684559291.jpg';
  // rem 与分辨率 比例
  public static remScale: number = 100;
  // 相册bocket
  public static photoBocket: string = 'wyb-photo';

  // 输出打印
  public static print(message?: any, ...optionalParams: any[]) {
    if (debug) {
      console.log(message, ...optionalParams);
    }
  }

  // 初始化配置数据
  public static setOption(data: object) {
    Object.assign(this, data);
  }
}

export default WConfig;


